<template>
  <div v-if="tagsText !== ''">
    <el-tag :type="type" :size="size" v-for="(item,index) in textArr" :key="index">{{ item }}</el-tag>
  </div>
  <div v-else>
    &nbsp;
  </div>
</template>

<script>
export default {
  name: "CsMultipleTags",
  props: {
    tagsText: {
      type: String
    },
    type: {
      type: String
    },
    size: {
      type: String
    }
  },
  computed: {
    textArr() {
      const arr = this.tagsText.split(',')
      return arr
    }
  }
}
</script>

<style scoped>
.el-tag {
  margin-right: 10px;
}
</style>
